USE [Tibet]
GO
/****** Object:  StoredProcedure [dbo].[SELTodosLosProyectos]    Script Date: 05/27/2011 05:35:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[SELTodosLosProyectos]
	-- Add the parameters for the stored procedure here
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT P.idProyecto, P.NombreProyecto,P.Estatus,P.Ruta,P.Dias,P.Fk_Perfil_Metrica_idPerfil_Metrica, F.Fecha 
	FROM [Tibet].[dbo].[Proyecto] AS P, [Tibet].[dbo].[Fecha] AS F 
	WHERE F.Fk_Proyecto_idProyecto = P.idProyecto 
		AND F.Tipo = 'Creacion' 
		AND P.Fk_Perfil_Metrica_idPerfil_Metrica IS NOT NULL 
END
